var assert = require('assert');
var should = require('should');
var util = require('util');
var zlib = require('zlib');
var _ = require('lodash');
var payConf = require('../../app/config/payConf');
var dataApi = require('../../app/libs/dataApi');

suite('payConf', function () {
    suite('getConf', function () {
        test('获取配置', function () {
            payConf.getConf(201);
        });
    });

    suite('getProductDiamond', function () {
        test('获取配置', function () {
            payConf.getProductDiamond(201, false).should.equal(60);
            payConf.getProductDiamond(202, true).should.equal(360);
            //console.log(payConf.getProductDiamond(202, true)); 
        });
    });

    suite('getProductMonthDay', function () {
        test('获取月卡的天数', function () {
            // payConf.getProductMonthDay(301).should.equal(31);
            payConf.getProductMonthDay(301);
        });
    });

    suite('getNextSinglePayConf', function () {
        test('查询单笔充值配置', function () {
            payConf.getNextSinglePayConf(0).id.should.above(0);
            // console.log('next of 0:',payConf.getNextSinglePayConf(0));
            // console.log('next of 25:',payConf.getNextSinglePayConf(25));
            // console.log('next of 168:',payConf.getNextSinglePayConf(168));
        });
    });
});
